package com.magold.sprite;

import java.util.ArrayList;
import java.util.List;

import org.andengine.engine.camera.Camera;
import org.andengine.engine.handler.IUpdateHandler;
import org.andengine.entity.IEntity;
import org.andengine.entity.IEntityComparator;
import org.andengine.entity.IEntityMatcher;
import org.andengine.entity.IEntityParameterCallable;
import org.andengine.entity.modifier.IEntityModifier;
import org.andengine.entity.modifier.IEntityModifier.IEntityModifierMatcher;
import org.andengine.opengl.util.GLState;
import org.andengine.util.adt.transformation.Transformation;
import org.andengine.util.color.Color;

public abstract class EntityFilter implements IEntity {
	
	protected abstract IEntity getWrappedEntity();
	
	@Override
	public boolean isDisposed() {
		return getWrappedEntity().isDisposed();
	}

	@Override
	public void onUpdate(float pSecondsElapsed) {
		getWrappedEntity().onUpdate(pSecondsElapsed);
	}

	@Override
	public void onDraw(GLState pGLState, Camera pCamera) {
		getWrappedEntity().onDraw(pGLState, pCamera);
	}

	@Override
	public void dispose() throws AlreadyDisposedException {
		getWrappedEntity().dispose();
	}

	@Override
	public void reset() {
		getWrappedEntity().reset();
	}

	@Override
	public boolean isVisible() {
		return getWrappedEntity().isVisible();
	}

	@Override
	public void setVisible(boolean pVisible) {
		getWrappedEntity().setVisible(pVisible);
	}

	@Override
	public boolean isIgnoreUpdate() {
		return getWrappedEntity().isIgnoreUpdate();
	}

	@Override
	public void setIgnoreUpdate(boolean pIgnoreUpdate) {
		getWrappedEntity().setIgnoreUpdate(pIgnoreUpdate);
	}

	@Override
	public boolean isChildrenVisible() {
		return getWrappedEntity().isChildrenVisible();
	}

	@Override
	public void setChildrenVisible(boolean pChildrenVisible) {
		getWrappedEntity().setChildrenVisible(pChildrenVisible);
	}

	@Override
	public boolean isChildrenIgnoreUpdate() {
		return getWrappedEntity().isChildrenIgnoreUpdate();
	}

	@Override
	public void setChildrenIgnoreUpdate(boolean pChildrenIgnoreUpdate) {
		getWrappedEntity().setChildrenIgnoreUpdate(pChildrenIgnoreUpdate);
	}

	@Override
	public int getTag() {
		return getWrappedEntity().getTag();
	}

	@Override
	public void setTag(int pTag) {
		getWrappedEntity().setTag(pTag);
	}

	@Override
	public int getZIndex() {
		return getWrappedEntity().getZIndex();
	}

	@Override
	public void setZIndex(int pZIndex) {
		getWrappedEntity().setZIndex(pZIndex);
	}

	@Override
	public boolean hasParent() {
		return getWrappedEntity().hasParent();
	}

	@Override
	public IEntity getParent() {
		return getWrappedEntity().getParent();
	}

	@Override
	public void setParent(IEntity pEntity) {
		getWrappedEntity().setParent(pEntity);
	}

	@Override
	public float getX() {
		return getWrappedEntity().getX();
	}

	@Override
	public float getY() {
		return getWrappedEntity().getY();
	}

	@Override
	public void setX(float pX) {
		getWrappedEntity().setX(pX);
	}

	@Override
	public void setY(float pY) {
		getWrappedEntity().setY(pY);
	}

	@Override
	public void setPosition(IEntity pOtherEntity) {
		getWrappedEntity().setPosition(pOtherEntity);
	}

	@Override
	public void setPosition(float pX, float pY) {
		getWrappedEntity().setPosition(pX, pY);
	}

	@Override
	public boolean isRotated() {
		return getWrappedEntity().isRotated();
	}

	@Override
	public float getRotation() {
		return getWrappedEntity().getRotation();
	}

	@Override
	public void setRotation(float pRotation) {
		getWrappedEntity().setRotation(pRotation);
	}

	@Override
	public float getRotationCenterX() {
		return getWrappedEntity().getRotationCenterX();
	}

	@Override
	public float getRotationCenterY() {
		return getWrappedEntity().getRotationCenterY();
	}

	@Override
	public void setRotationCenterX(float pRotationCenterX) {
		getWrappedEntity().setRotationCenterX(pRotationCenterX);
	}

	@Override
	public void setRotationCenterY(float pRotationCenterY) {
		getWrappedEntity().setRotationCenterY(pRotationCenterY);
	}

	@Override
	public void setRotationCenter(float pRotationCenterX, float pRotationCenterY) {
		getWrappedEntity().setRotationCenter(pRotationCenterX, pRotationCenterY);
	}

	@Override
	public boolean isScaled() {
		return getWrappedEntity().isScaled();
	}

	@Override
	public float getScaleX() {
		return getWrappedEntity().getScaleX();
	}

	@Override
	public float getScaleY() {
		return getWrappedEntity().getScaleY();
	}

	@Override
	public void setScaleX(float pScaleX) {
		getWrappedEntity().setScaleX(pScaleX);
	}

	@Override
	public void setScaleY(float pScaleY) {
		getWrappedEntity().setScaleY(pScaleY);
	}

	@Override
	public void setScale(float pScale) {
		getWrappedEntity().setScale(pScale);
	}

	@Override
	public void setScale(float pScaleX, float pScaleY) {
		getWrappedEntity().setScale(pScaleX, pScaleY);
	}

	@Override
	public float getScaleCenterX() {
		return getWrappedEntity().getScaleCenterX();
	}

	@Override
	public float getScaleCenterY() {
		return getWrappedEntity().getScaleCenterY();
	}

	@Override
	public void setScaleCenterX(float pScaleCenterX) {
		getWrappedEntity().setScaleCenterX(pScaleCenterX);
	}

	@Override
	public void setScaleCenterY(float pScaleCenterY) {
		getWrappedEntity().setScaleCenterY(pScaleCenterY);
	}

	@Override
	public void setScaleCenter(float pScaleCenterX, float pScaleCenterY) {
		getWrappedEntity().setScaleCenter(pScaleCenterX, pScaleCenterY);
	}

	@Override
	public boolean isSkewed() {
		return getWrappedEntity().isSkewed();
	}

	@Override
	public float getSkewX() {
		return getWrappedEntity().getSkewX();
	}

	@Override
	public float getSkewY() {
		return getWrappedEntity().getSkewY();
	}

	@Override
	public void setSkewX(float pSkewX) {
		getWrappedEntity().setSkewX(pSkewX);
	}

	@Override
	public void setSkewY(float pSkewY) {
		getWrappedEntity().setSkewY(pSkewY);
	}

	@Override
	public void setSkew(float pSkew) {
		getWrappedEntity().setSkew(pSkew);
	}

	@Override
	public void setSkew(float pSkewX, float pSkewY) {
		getWrappedEntity().setSkew(pSkewX, pSkewY);
	}

	@Override
	public float getSkewCenterX() {
		return getWrappedEntity().getSkewCenterX();
	}

	@Override
	public float getSkewCenterY() {
		return getWrappedEntity().getSkewCenterY();
	}

	@Override
	public void setSkewCenterX(float pSkewCenterX) {
		getWrappedEntity().setSkewCenterX(pSkewCenterX);
	}

	@Override
	public void setSkewCenterY(float pSkewCenterY) {
		getWrappedEntity().setSkewCenterY(pSkewCenterY);
	}

	@Override
	public void setSkewCenter(float pSkewCenterX, float pSkewCenterY) {
		getWrappedEntity().setSkewCenter(pSkewCenterX, pSkewCenterY);
	}

	@Override
	public boolean isRotatedOrScaledOrSkewed() {
		return getWrappedEntity().isRotatedOrScaledOrSkewed();
	}

	@Override
	public float getRed() {
		return getWrappedEntity().getRed();
	}

	@Override
	public float getGreen() {
		return getWrappedEntity().getGreen();
	}

	@Override
	public float getBlue() {
		return getWrappedEntity().getBlue();
	}

	@Override
	public float getAlpha() {
		return getWrappedEntity().getAlpha();
	}

	@Override
	public Color getColor() {
		return getWrappedEntity().getColor();
	}

	@Override
	public void setRed(float pRed) {
		getWrappedEntity().setRed(pRed);
	}

	@Override
	public void setGreen(float pGreen) {
		getWrappedEntity().setGreen(pGreen);
	}

	@Override
	public void setBlue(float pBlue) {
		getWrappedEntity().setBlue(pBlue);
	}

	@Override
	public void setAlpha(float pAlpha) {
		getWrappedEntity().setAlpha(pAlpha);
	}

	@Override
	public void setColor(Color pColor) {
		getWrappedEntity().setColor(pColor);
	}

	@Override
	public void setColor(float pRed, float pGreen, float pBlue) {
		getWrappedEntity().setColor(pRed, pGreen, pBlue);
	}

	@Override
	public void setColor(float pRed, float pGreen, float pBlue, float pAlpha) {
		getWrappedEntity().setColor(pRed, pGreen, pBlue, pAlpha);
	}

	@Override
	public float[] getSceneCenterCoordinates() {
		return getWrappedEntity().getSceneCenterCoordinates();
	}

	@Override
	public float[] getSceneCenterCoordinates(float[] pReuse) {
		return getWrappedEntity().getSceneCenterCoordinates(pReuse);
	}

	@Override
	public float[] convertLocalToSceneCoordinates(float pX, float pY) {
		return getWrappedEntity().convertLocalToSceneCoordinates(pX, pY);
	}

	@Override
	public float[] convertLocalToSceneCoordinates(float pX, float pY,
			float[] pReuse) {
		return getWrappedEntity().convertLocalToSceneCoordinates(pX, pY, pReuse);
	}

	@Override
	public float[] convertLocalToSceneCoordinates(float[] pCoordinates) {
		return getWrappedEntity().convertLocalToSceneCoordinates(pCoordinates);
	}

	@Override
	public float[] convertLocalToSceneCoordinates(float[] pCoordinates,
			float[] pReuse) {
		return getWrappedEntity().convertLocalToSceneCoordinates(pCoordinates, pReuse);
	}

	@Override
	public float[] convertSceneToLocalCoordinates(float pX, float pY) {
		return getWrappedEntity().convertSceneToLocalCoordinates(pX, pY);
	}

	@Override
	public float[] convertSceneToLocalCoordinates(float pX, float pY,
			float[] pReuse) {
		return getWrappedEntity().convertSceneToLocalCoordinates(pX, pY, pReuse);
	}

	@Override
	public float[] convertSceneToLocalCoordinates(float[] pCoordinates) {
		return getWrappedEntity().convertSceneToLocalCoordinates(pCoordinates);
	}

	@Override
	public float[] convertSceneToLocalCoordinates(float[] pCoordinates,
			float[] pReuse) {
		return getWrappedEntity().convertSceneToLocalCoordinates(pCoordinates, pReuse);
	}

	@Override
	public Transformation getLocalToSceneTransformation() {
		return getWrappedEntity().getLocalToSceneTransformation();
	}

	@Override
	public Transformation getSceneToLocalTransformation() {
		return getWrappedEntity().getSceneToLocalTransformation();
	}

	@Override
	public Transformation getLocalToParentTransformation() {
		return getWrappedEntity().getLocalToParentTransformation();
	}

	@Override
	public Transformation getParentToLocalTransformation() {
		return getWrappedEntity().getParentToLocalTransformation();
	}

	@Override
	public int getChildCount() {
		return getWrappedEntity().getChildCount();
	}

	@Override
	public void onAttached() {
		getWrappedEntity().onAttached();
	}

	@Override
	public void onDetached() {
		getWrappedEntity().onDetached();
	}

	@Override
	public void attachChild(IEntity pEntity) {
		getWrappedEntity().attachChild(pEntity);
	}

	@Override
	public IEntity getChildByTag(int pTag) {
		return getWrappedEntity().getChildByTag(pTag);
	}

	@Override
	public IEntity getChildByMatcher(IEntityMatcher pEntityMatcher) {
		return getWrappedEntity().getChildByMatcher(pEntityMatcher);
	}

	@Override
	public IEntity getChildByIndex(int pIndex) {
		return getWrappedEntity().getChildByIndex(pIndex);
	}

	@Override
	public IEntity getFirstChild() {
		return getWrappedEntity().getFirstChild();
	}

	@Override
	public IEntity getLastChild() {
		return getWrappedEntity().getLastChild();
	}

	@Override
	public ArrayList<IEntity> query(IEntityMatcher pEntityMatcher) {
		return getWrappedEntity().query(pEntityMatcher);
	}

	@Override
	public IEntity queryFirst(IEntityMatcher pEntityMatcher) {
		return getWrappedEntity().queryFirst(pEntityMatcher);
	}

	@Override
	public <L extends List<IEntity>> L query(IEntityMatcher pEntityMatcher,
			L pResult) {
		return getWrappedEntity().query(pEntityMatcher, pResult);
	}

	@Override
	public <S extends IEntity> S queryFirstForSubclass(
			IEntityMatcher pEntityMatcher) {
		return getWrappedEntity().queryFirstForSubclass(pEntityMatcher);
	}

	@Override
	public <S extends IEntity> ArrayList<S> queryForSubclass(
			IEntityMatcher pEntityMatcher) throws ClassCastException {
		return getWrappedEntity().queryForSubclass(pEntityMatcher);
	}

	@Override
	public <L extends List<S>, S extends IEntity> L queryForSubclass(
			IEntityMatcher pEntityMatcher, L pResult) throws ClassCastException {
		return getWrappedEntity().queryForSubclass(pEntityMatcher, pResult);
	}

	@Override
	public void sortChildren() {
		getWrappedEntity().sortChildren();
	}

	@Override
	public void sortChildren(boolean pImmediate) {
		getWrappedEntity().sortChildren(pImmediate);
	}

	@Override
	public void sortChildren(IEntityComparator pEntityComparator) {
		getWrappedEntity().sortChildren(pEntityComparator);
	}

	@Override
	public boolean detachSelf() {
		return getWrappedEntity().detachSelf();
	}

	@Override
	public boolean detachChild(IEntity pEntity) {
		return getWrappedEntity().detachChild(pEntity);
	}

	@Override
	public IEntity detachChild(int pTag) {
		return getWrappedEntity().detachChild(pTag);
	}

	@Override
	public IEntity detachChild(IEntityMatcher pEntityMatcher) {
		return getWrappedEntity().detachChild(pEntityMatcher);
	}

	@Override
	public boolean detachChildren(IEntityMatcher pEntityMatcher) {
		return getWrappedEntity().detachChildren(pEntityMatcher);
	}

	@Override
	public void detachChildren() {
		getWrappedEntity().detachChildren();
	}

	@Override
	public void callOnChildren(IEntityParameterCallable pEntityParameterCallable) {
		getWrappedEntity().callOnChildren(pEntityParameterCallable);
	}

	@Override
	public void callOnChildren(
			IEntityParameterCallable pEntityParameterCallable,
			IEntityMatcher pEntityMatcher) {
		getWrappedEntity().callOnChildren(pEntityParameterCallable, pEntityMatcher);
	}

	@Override
	public void registerUpdateHandler(IUpdateHandler pUpdateHandler) {
		getWrappedEntity().registerUpdateHandler(pUpdateHandler);
	}

	@Override
	public boolean unregisterUpdateHandler(IUpdateHandler pUpdateHandler) {
		return getWrappedEntity().unregisterUpdateHandler(pUpdateHandler);
	}

	@Override
	public boolean unregisterUpdateHandlers(
			IUpdateHandlerMatcher pUpdateHandlerMatcher) {
		return getWrappedEntity().unregisterUpdateHandlers(pUpdateHandlerMatcher);
	}

	@Override
	public int getUpdateHandlerCount() {
		return getWrappedEntity().getUpdateHandlerCount();
	}

	@Override
	public void clearUpdateHandlers() {
		getWrappedEntity().clearUpdateHandlers();
	}

	@Override
	public void registerEntityModifier(IEntityModifier pEntityModifier) {
		getWrappedEntity().registerEntityModifier(pEntityModifier);
	}

	@Override
	public boolean unregisterEntityModifier(IEntityModifier pEntityModifier) {
		return getWrappedEntity().unregisterEntityModifier(pEntityModifier);
	}

	@Override
	public boolean unregisterEntityModifiers(
			IEntityModifierMatcher pEntityModifierMatcher) {
		return getWrappedEntity().unregisterEntityModifiers(pEntityModifierMatcher);
	}

	@Override
	public int getEntityModifierCount() {
		return getWrappedEntity().getEntityModifierCount();
	}

	@Override
	public void clearEntityModifiers() {
		getWrappedEntity().clearEntityModifiers();
	}

	@Override
	public boolean isCullingEnabled() {
		return getWrappedEntity().isCullingEnabled();
	}

	@Override
	public void setCullingEnabled(boolean pCullingEnabled) {
		getWrappedEntity().setCullingEnabled(pCullingEnabled);
	}

	@Override
	public boolean isCulled(Camera pCamera) {
		return getWrappedEntity().isCulled(pCamera);
	}

	@Override
	public void setUserData(Object pUserData) {
		getWrappedEntity().setUserData(pUserData);
	}

	@Override
	public Object getUserData() {
		return getWrappedEntity().getUserData();
	}

	@Override
	public void toString(StringBuilder pStringBuilder) {
		getWrappedEntity().toString(pStringBuilder);
	}

}
